<?php
/**
 * SaleViewModel
 *
 * @author Mike Gao
 */
class Sale_detailViewModel extends ViewModel{
    protected $pk  = 'Sale_detail.id';

    public $viewFields = array(
    	'Sale_detail' => array('*'),
        
    	'Sale' => array('id','pay_time','user_id','total','order_status','create_time'=>'sctime','shipping_time','order_source_id','logicompany_id','logino','customer_id','status'=>'s_status','mall_no','sum_number','check_time','shipping_time','order_source_id','remark','shipping_name',
    		'_on' => 'Sale_detail.sale_id = Sale.id'),
        
        //'Warehouse' => array('name'=>'wname', '_on' => 'Sale.warehouse_id = Warehouse.id'),
        //'Customer' => array('name'=>'customer', '_on' => 'Sale.customer_id = Customer.id'),
        'Product' => array('id'=>'pid', 'name', 'tm','unit_id','cat_id','cost_default','minstock','common_id','_on' => 'Sale_detail.product_id = Product.id'),
        
    );


}
?>
